package com.ssm.platform.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ssm.basis.model.pojo.domain.BaseDo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 分组表
 * </p>
 *
 * @author jhxxb
 * @since 2021-11-15
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("groups")
@Schema(description = "分组表")
public class GroupsDo extends BaseDo<GroupsDo> {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键 ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "父 ID")
    private Long parentId;

    @Schema(description = "parent_id 确定上下级，name_link 用于查出所有下级。例上级0-，下级0-4-")
    private String idLink;

    @Schema(description = "是否为叶子节点，0(false)-表示不是，1(true)-表示是")
    private Boolean isLeafNode;

    @Schema(description = "组名")
    private String groupName;

    @Schema(description = "组类型：角色(机构、部门)组、菜单组")
    private String groupType;

    @Schema(description = "描述")
    private String description;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
